package edu.cuit.zhuyimeng.flight.api.controller;

import edu.cuit.zhuyimeng.flight.api.dto.FlightInfoDTO;
import edu.cuit.zhuyimeng.framework.common.result.CommonResult;
import jakarta.validation.constraints.NotNull;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * 航班查询API
 */
@FeignClient(value = "flight-service",contextId = "flight-query",path = "flight")
public interface FlightQueryApiController {

    /**
     * 查询某个航班
     */
    @GetMapping("/{id}")
    CommonResult<FlightInfoDTO> queryOneFlight(@PathVariable("id") @NotNull Long id);

}
